// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name:   CamelCaseToMapResultTransformer.java

package com.sailing.xjpb.orm.utils;

import org.hibernate.transform.AliasedTupleSubsetResultTransformer;

import java.util.HashMap;
import java.util.Map;


public class MapResultTransformer extends AliasedTupleSubsetResultTransformer {

    private static final long serialVersionUID = 1L;
    public static final MapResultTransformer INSTANCE = new MapResultTransformer();

    private MapResultTransformer() {

    }

    @Override
    public Object transformTuple(Object[] tuple, String[] aliases) {
        Map<String, Object> result = new HashMap<>(tuple.length);
        for (int i = 0; i < tuple.length; i++) {
            result.put(aliases[i], tuple[i]);
        }
        return result;
    }

    @Override
    public boolean isTransformedValueATupleElement(String[] aliases, int tupleLength) {
        return false;
    }

}
